/* podw.t PURCHASE ORDER LINE WRITE TRIGGER                                   */
/*Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                         */
/*All rights reserved worldwide.  This is an unpublished work.                */
/* $Revision: 1.9 $                                                           */
/*V8:ConvertMode=NoConvert                                                    */
/******************************************************************************/
/*  !Description : This program is a database trigger running                 */
/*          : everytime a record is changed.  It will create a                */
/*          : worktable and then call another program                         */
/*          :                                                                 */
/******************************************************************************/
/*                             MODIFY LOG                                     */
/******************************************************************************/
/* REVISION 8.5      LAST MODIFIED: 01/19/96   BY: *J0FY* BHolmes             */
/* REVISION 8.5      LAST MODIFIED: 06/25/96   BY: *J0M9* BHolmes             */
/* REVISION 8.5      LAST MODIFIED: 01/07/97   BY: *J1DM* jpm                 */
/* REVISION 9.1      LAST MODIFIED: 08/13/00   BY: *N0KQ* myb                 */
/* Old ECO marker removed, but no ECO header exists *J12B*                    */
/* Revision: 1.4       BY: Mark Christian        DATE: 09/09/01  ECO: *M1KG*  */
/* Revision: 1.5       BY: Jean Miller           DATE: 06/13/02  ECO: *P082*  */
/* Revision: 1.8       BY: Jean Miller           DATE: 08/01/02  ECO: *P0CL*  */
/* $Revision: 1.9 $    BY: Jean Miller           DATE: 08/17/02  ECO: *P0FN*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

TRIGGER PROCEDURE FOR WRITE OF POD_DET OLD BUFFER OLD_POD_DET.

{mfdeclre.i }

define new shared work-table wf_old_pod_det like pod_det.

define new shared variable w-recid       as recid.
define new shared variable w-site-loc-id as character.
define new shared variable w-te_type     as character.

define variable w-file      as character format "x(24)".
define variable l-qualifier as character format "x(8)".

/* WAREHOUSING INTERFACE PROCESSING */

WI:
do:

   /* IF THERE IS NO ACTIVE EXTERNAL WAREHOUSE THAT IS FLAGGED TO     */
   /* RECEIVE PURCHASE ORDER EXPORT TRANSACTIONS, THEN DO NOT PROCESS */
   if not can-find(first whl_mstr no-lock
   where whl_mstr.whl_act
   and   whl_mstr.whl_po_exp)
   then
      leave WI.

   /* IF NO PERTINENT FIELDS HAVE BEEN CHANGED, THEN DO NOT PROCESS */
   if (old_pod_det.pod_nbr        = pod_det.pod_nbr
   and old_pod_det.pod_line       = pod_det.pod_line
   and old_pod_det.pod_part       = pod_det.pod_part
   and old_pod_det.pod_vpart      = pod_det.pod_vpart
   and old_pod_det.pod_desc       = pod_det.pod_desc
   and old_pod_det.pod_site       = pod_det.pod_site
   and old_pod_det.pod_loc        = pod_det.pod_loc
   and old_pod_det.pod_rev        = pod_det.pod_rev
   and old_pod_det.pod_qty_ord    = pod_det.pod_qty_ord
   and old_pod_det.pod_um         = pod_det.pod_um
   and old_pod_det.pod_um_conv    = pod_det.pod_um_conv
   and old_pod_det.pod_wo_lot     = pod_det.pod_wo_lot
   and old_pod_det.pod_op         = pod_det.pod_op
   and old_pod_det.pod_pur_cost   = pod_det.pod_pur_cost
   and old_pod_det.pod_status     = pod_det.pod_status
   and old_pod_det.pod_sched      = pod_det.pod_sched
   and old_pod_det.pod_due_date   = pod_det.pod_due_date
   and old_pod_det.pod_user1      = pod_det.pod_user1
   and old_pod_det.pod_user2      = pod_det.pod_user2
   and old_pod_det.pod_cum_qty[3] = pod_det.pod_cum_qty[3]
   and old_pod_det.pod_cmtindx    = pod_det.pod_cmtindx)
   then
      leave WI.

   /* MOVE OLD pod_det VALUES TO WORK TABLE FOR SUBSEQUENT PROCESSING */
   w-recid = recid(pod_det).

   create wf_old_pod_det.

   if recid(wf_old_pod_det)= -1
   then .

   assign
      wf_old_pod_det.pod_nbr        = old_pod_det.pod_nbr
      wf_old_pod_det.pod_line       = old_pod_det.pod_line
      wf_old_pod_det.pod_part       = old_pod_det.pod_part
      wf_old_pod_det.pod_vpart      = old_pod_det.pod_vpart
      wf_old_pod_det.pod_desc       = old_pod_det.pod_desc
      wf_old_pod_det.pod_site       = old_pod_det.pod_site
      wf_old_pod_det.pod_loc        = old_pod_det.pod_loc
      wf_old_pod_det.pod_rev        = old_pod_det.pod_rev
      wf_old_pod_det.pod_qty_ord    = old_pod_det.pod_qty_ord
      wf_old_pod_det.pod_um         = old_pod_det.pod_um
      wf_old_pod_det.pod_um_conv    = old_pod_det.pod_um_conv
      wf_old_pod_det.pod_wo_lot     = old_pod_det.pod_wo_lot
      wf_old_pod_det.pod_op         = old_pod_det.pod_op
      wf_old_pod_det.pod_pur_cost   = old_pod_det.pod_pur_cost
      wf_old_pod_det.pod_status     = old_pod_det.pod_status
      wf_old_pod_det.pod_sched      = old_pod_det.pod_sched
      wf_old_pod_det.pod_due_date   = old_pod_det.pod_due_date
      wf_old_pod_det.pod_user1      = old_pod_det.pod_user1
      wf_old_pod_det.pod_user2      = old_pod_det.pod_user2
      wf_old_pod_det.pod_cum_qty[3] = old_pod_det.pod_cum_qty[3]
      wf_old_pod_det.pod_cmtindx    = old_pod_det.pod_cmtindx.

   /* CALL SUBPROGRAM TO CREATE EXPORT TRANSACTIONS */
   w-file = "wipodw.p".

   {gprunmo.i &module="WI"
      &program="wipodw.p"}

end. /* WI */

/* Track Capacity Units */
if new pod_det and
  (old_pod_det.pod_nbr  <> pod_det.pod_nbr  or
   old_pod_det.pod_line <> pod_det.pod_line)
then do:

   l-qualifier = "".

   /* See if this is a Blanket PO */
   if can-find(first po_mstr where po_mstr.po_nbr = pod_det.pod_nbr
                               and po_mstr.po_blanket <> "")
   then
      l-qualifier = "BLANKET".
   else
      l-qualifier = "".

   /* If not a Blanket PO, is this a scheduled Line */
   if l-qualifier = "" and pod_det.pod_sched then
      l-qualifier = "SCHED".

   {lvucap.i &TABLE="pod_det" &QUALIFIER="l-qualifier"}

end.

/* fdn 2004/10/28 Modify Record processing */
HK:
do:
    if can-find(first dt_mstr where dt_table = "pod_det" and dt_type = "SYNC") then
        run CreateSyncFlag(input "MOD", input recid(pod_det), input "pod_det").

    if not can-find ( first dt_mstr where dt_table = "pod_det" and dt_type = "MOD" ) then leave HK.
    
    if not can-find ( first wf_old_pod_det ) then do:
        create wf_old_pod_det.
        if recid(wf_old_pod_det)= -1 then .
    end.
    
    buffer-copy old_pod_det to wf_old_pod_det no-error.

    for each dt_mstr no-lock where dt_table = "pod_det" and dt_type = "MOD" :
    
        case dt_field :

            when "pod_nbr" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_nbr, input pod_det.pod_nbr,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_due_date" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_due_date), input string(pod_det.pod_due_date),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_line" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_line), input string(pod_det.pod_line),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_part" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_part, input pod_det.pod_part,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_qty_ord" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_qty_ord), input string(pod_det.pod_qty_ord),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_qty_rcvd" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_qty_rcvd), input string(pod_det.pod_qty_rcvd),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_pur_cost" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_pur_cost), input string(pod_det.pod_pur_cost),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_std_cost" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_std_cost), input string(pod_det.pod_std_cost),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_so_job" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_so_job, input pod_det.pod_so_job,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_qty_chg" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_qty_chg), input string(pod_det.pod_qty_chg),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_cost_chg" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_cost_chg), input string(pod_det.pod_cost_chg),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_bo_chg" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_bo_chg), input string(pod_det.pod_bo_chg),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_acct" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_acct, input pod_det.pod_acct,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_per_date" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_per_date), input string(pod_det.pod_per_date),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_type" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_type, input pod_det.pod_type,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_insp_rqd" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_insp_rqd), input string(pod_det.pod_insp_rqd),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_wo_lot" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_wo_lot, input pod_det.pod_wo_lot,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_vpart" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_vpart, input pod_det.pod_vpart,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_need" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_need), input string(pod_det.pod_need),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_taxable" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_taxable), input string(pod_det.pod_taxable),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_desc" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_desc, input pod_det.pod_desc,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_cc" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_cc, input pod_det.pod_cc,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad04[1]" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__qad04[1], input pod_det.pod__qad04[1],
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_um" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_um, input pod_det.pod_um,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_disc_pct" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_disc_pct), input string(pod_det.pod_disc_pct),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_req_nbr" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_req_nbr, input pod_det.pod_req_nbr,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad10" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__qad10, input pod_det.pod__qad10,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_um_conv" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_um_conv), input string(pod_det.pod_um_conv),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_loc" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_loc, input pod_det.pod_loc,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_serial" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_serial, input pod_det.pod_serial,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_op" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_op), input string(pod_det.pod_op),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_contract" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_contract, input pod_det.pod_contract,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_status" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_status, input pod_det.pod_status,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_rev" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_rev, input pod_det.pod_rev,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_cmtindx" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_cmtindx), input string(pod_det.pod_cmtindx),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_req_line" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_req_line), input string(pod_det.pod_req_line),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_project" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_project, input pod_det.pod_project,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_ps_chg" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_ps_chg), input string(pod_det.pod_ps_chg),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_cst_up" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_cst_up), input string(pod_det.pod_cst_up),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_rum" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_rum, input pod_det.pod_rum,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_user1" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_user1, input pod_det.pod_user1,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_user2" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_user2, input pod_det.pod_user2,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_vat" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_vat), input string(pod_det.pod_vat),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad16" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__qad16, input pod_det.pod__qad16,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad06" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__qad06, input pod_det.pod__qad06,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_pst" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_pst), input string(pod_det.pod_pst),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad13" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qad13), input string(pod_det.pod__qad13),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad07" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__qad07, input pod_det.pod__qad07,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_pay_um" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_pay_um, input pod_det.pod_pay_um,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_pum_conv" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_pum_conv), input string(pod_det.pod_pum_conv),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad15" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qad15), input string(pod_det.pod__qad15),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_site" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_site, input pod_det.pod_site,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_rum_conv" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_rum_conv), input string(pod_det.pod_rum_conv),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_qty_rtnd" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_qty_rtnd), input string(pod_det.pod_qty_rtnd),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_blanket" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_blanket, input pod_det.pod_blanket,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_blnkt_ln" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_blnkt_ln), input string(pod_det.pod_blnkt_ln),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad01" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qad01), input string(pod_det.pod__qad01),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad02" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qad02), input string(pod_det.pod__qad02),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad03" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__qad03, input pod_det.pod__qad03,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad05" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qad05), input string(pod_det.pod__qad05),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad08" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qad08), input string(pod_det.pod__qad08),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad09" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qad09), input string(pod_det.pod__qad09),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad11" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__qad11, input pod_det.pod__qad11,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad12" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qad12), input string(pod_det.pod__qad12),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qad14" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qad14), input string(pod_det.pod__qad14),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_rel_nbr" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_rel_nbr), input string(pod_det.pod_rel_nbr),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_rel_qty" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_rel_qty), input string(pod_det.pod_rel_qty),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_reason" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_reason, input pod_det.pod_reason,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_request" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_request, input pod_det.pod_request,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_approve" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_approve, input pod_det.pod_approve,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__chr01" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__chr01, input pod_det.pod__chr01,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__chr02" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__chr02, input pod_det.pod__chr02,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__chr03" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__chr03, input pod_det.pod__chr03,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__chr04" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__chr04, input pod_det.pod__chr04,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__chr05" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__chr05, input pod_det.pod__chr05,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__chr06" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__chr06, input pod_det.pod__chr06,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__chr07" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__chr07, input pod_det.pod__chr07,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__chr08" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__chr08, input pod_det.pod__chr08,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__chr09" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__chr09, input pod_det.pod__chr09,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__chr10" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod__chr10, input pod_det.pod__chr10,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__dte01" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__dte01), input string(pod_det.pod__dte01),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__dte02" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__dte02), input string(pod_det.pod__dte02),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__dec01" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__dec01), input string(pod_det.pod__dec01),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__dec02" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__dec02), input string(pod_det.pod__dec02),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__log01" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__log01), input string(pod_det.pod__log01),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_rma_type" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_rma_type, input pod_det.pod_rma_type,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_tax_max" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_tax_max), input string(pod_det.pod_tax_max),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_cum_qty[1]" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_cum_qty[1]), input string(pod_det.pod_cum_qty[1]),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_cum_date[1]" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_cum_date[1]), input string(pod_det.pod_cum_date[1]),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_contr_id" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_contr_id, input pod_det.pod_contr_id,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_apr_code" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_apr_code, input pod_det.pod_apr_code,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_taxc" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_taxc, input pod_det.pod_taxc,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_po_site" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_po_site, input pod_det.pod_po_site,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_po_db" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_po_db, input pod_det.pod_po_db,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_firm_weeks" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_firm_weeks), input string(pod_det.pod_firm_weeks),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_mrp_pct" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_mrp_pct), input string(pod_det.pod_mrp_pct),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_raw_weeks" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_raw_weeks), input string(pod_det.pod_raw_weeks),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_fab_weeks" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_fab_weeks), input string(pod_det.pod_fab_weeks),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_plan_weeks" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_plan_weeks), input string(pod_det.pod_plan_weeks),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_curr_rlse_id[1]" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_curr_rlse_id[1], input pod_det.pod_curr_rlse_id[1],
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sched" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_sched), input string(pod_det.pod_sched),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_ord_mult" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_ord_mult), input string(pod_det.pod_ord_mult),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_pkg_code" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_pkg_code, input pod_det.pod_pkg_code,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sch_mrp" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_sch_mrp), input string(pod_det.pod_sch_mrp),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sch_data" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_sch_data, input pod_det.pod_sch_data,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_rlse_nbr" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_rlse_nbr), input string(pod_det.pod_rlse_nbr),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_ship_weeks" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_ship_weeks), input string(pod_det.pod_ship_weeks),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_translt_days" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_translt_days), input string(pod_det.pod_translt_days),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_fsm_type" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_fsm_type, input pod_det.pod_fsm_type,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sd_pat" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_sd_pat, input pod_det.pod_sd_pat,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sd_time" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_sd_time, input pod_det.pod_sd_time,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_plan_days" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_plan_days), input string(pod_det.pod_plan_days),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_plan_mths" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_plan_mths), input string(pod_det.pod_plan_mths),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_firm_days" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_firm_days), input string(pod_det.pod_firm_days),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_start_eff[1]" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_start_eff[1]), input string(pod_det.pod_start_eff[1]),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_end_eff[1]" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_end_eff[1]), input string(pod_det.pod_end_eff[1]),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_raw_days" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_raw_days), input string(pod_det.pod_raw_days),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_fab_days" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_fab_days), input string(pod_det.pod_fab_days),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_tax_usage" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_tax_usage, input pod_det.pod_tax_usage,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_tax_in" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_tax_in), input string(pod_det.pod_tax_in),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sched_chgd" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_sched_chgd), input string(pod_det.pod_sched_chgd),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_pr_list" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_pr_list, input pod_det.pod_pr_list,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_dock" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_dock, input pod_det.pod_dock,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_pastdue" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_pastdue, input pod_det.pod_pastdue,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_drp_ref" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_drp_ref, input pod_det.pod_drp_ref,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_tax_env" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_tax_env, input pod_det.pod_tax_env,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_crt_int" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_crt_int), input string(pod_det.pod_crt_int),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_translt_hrs" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_translt_hrs), input string(pod_det.pod_translt_hrs),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sftylt_days" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_sftylt_days), input string(pod_det.pod_sftylt_days),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sftylt_hrs" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_sftylt_hrs), input string(pod_det.pod_sftylt_hrs),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_fix_pr" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_fix_pr), input string(pod_det.pod_fix_pr),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_fr_list" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_fr_list, input pod_det.pod_fr_list,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_lot_next" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_lot_next, input pod_det.pod_lot_next,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_lot_rcpt" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_lot_rcpt), input string(pod_det.pod_lot_rcpt),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_grade" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_grade, input pod_det.pod_grade,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_expire" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_expire), input string(pod_det.pod_expire),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_rctstat" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_rctstat, input pod_det.pod_rctstat,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_assay" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_assay), input string(pod_det.pod_assay),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_rctstat_active" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_rctstat_active), input string(pod_det.pod_rctstat_active),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_pricing_dt" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_pricing_dt), input string(pod_det.pod_pricing_dt),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_pr_lst_tp" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_pr_lst_tp), input string(pod_det.pod_pr_lst_tp),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_ers_opt" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_ers_opt), input string(pod_det.pod_ers_opt),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qadd01" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qadd01), input string(pod_det.pod__qadd01),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qadd02" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qadd02), input string(pod_det.pod__qadd02),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod__qadd03" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod__qadd03), input string(pod_det.pod__qadd03),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sod_line" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_sod_line), input string(pod_det.pod_sod_line),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_so_status" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_so_status, input pod_det.pod_so_status,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sub_ship_date" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_sub_ship_date), input string(pod_det.pod_sub_ship_date),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sub_type" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_sub_type, input pod_det.pod_sub_type,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_sub" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_sub, input pod_det.pod_sub,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_wip_lotser" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input wf_old_pod_det.pod_wip_lotser, input pod_det.pod_wip_lotser,
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_pjs_line" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_pjs_line), input string(pod_det.pod_pjs_line),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_consignment" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_consignment), input string(pod_det.pod_consignment),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_max_aging_days" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_max_aging_days), input string(pod_det.pod_max_aging_days),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

            when "pod_multi_due_dates" then
                run CreateDthist(input dt_table, input dt_field, input dt_type, input string(wf_old_pod_det.pod_multi_due_dates), input string(pod_det.pod_multi_due_dates),
                    input recid(pod_det), input pod_det.pod_nbr, input string(pod_det.pod_line), input "", input "",
                    input "", input "", input "", input "").

        end.

    end.
end.

{hkdttrans.i}
